﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VanningDetail.aspx.cs"
    Inherits="WMS6.Web.Outbound.VanningDetail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>EncaseMent</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function() {
            initEditNewPage();

        }
        function selectCarton() {
            var rtnValue = popModalWindow('../Configuration/CartonQuery.aspx?action=txtContainerType&type=CARTON_TYPE', 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if (rtnValue != null && rtnValue.toString() != "") {
                document.getElementById("txtContainerType").focus();
                document.getElementById("txtContainerType").value = rtnValue;
            }
        }
        
         ///验证数量方法
         function  VerifyTheQty(obj)
         {     
            var  oldqty = parseInt(obj.title);
            var  newqty = parseInt(obj.value);
            if(newqty >oldqty)
            {
            
              document.getElementById('lblMsg').innerText='本行数量不等大于'+oldqty;
              obj.value =0;
              obj.focus();
            }
         }        
    </script>

</head>
<body>
    <form id="F7543" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblAllocateRuleDetail" runat="server" CssClass="label_header" Text="装箱明细"
                            meta:resourcekey="lblAllocateRuleDetail"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>"
                            AccessKey="c" ValidationGroup="aa" OnClick="btnGoBack_Click" Enabled="true" />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>"
                            AccessKey="s" OnClick="btnSave_Click" Enabled="true" meta:resourcekey="btnSave" />
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" meta:resourcekey="lblMsg"></asp:Label>
        </div>
        <div id="div_menu">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="divL1">
                </div>
            </div>
            <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,1)"
                id="divM1">
                <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">基本信息</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR1">
                </div>
            </div>
        </div>
        <div id="div_content">
            <div id="con_one_1" style="display: block; overflow-x: auto; overflow-y: hidden;">
                <table width="900" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td width="230px">
                            <asp:Label ID="lblContainerID" runat="server" CssClass="label" Text="容器编号" meta:resourcekey="lblContainerID"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="230px">
                            <asp:Label ID="lblContainerType" runat="server" CssClass="label" Text="容器类型" meta:resourcekey="lblContainerType"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="230px">
                            <asp:Label ID="lblLength" runat="server" CssClass="label" Text="长" meta:resourcekey="lblLength"></asp:Label>
                        </td>
                        <td width="230px">
                            <asp:Label ID="lblTotalQty" runat="server" CssClass="label" Text="总数量" meta:resourcekey="lblTotalQty"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtContainerID" runat="server" CssClass="textbox" MaxLength="10"
                                meta:resourcekey="txtContainerID"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtContainerType" runat="server" CssClass="textbox" meta:resourcekey="txtContainerType"></asp:TextBox><img
                                src="../Images/icon_find.gif" alt="select one item" id="imgContainerType" runat="server"
                                class="img" onclick="selectCarton();" />
                        </td>
                        <td>
                            <asp:TextBox ID="txtLength" runat="server" CssClass="textbox" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="txtLength"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTotalQty" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtTotalQty"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblBarcode" runat="server" CssClass="label" Text="货品条码" meta:resourcekey="lblBarcode"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblSkuID" runat="server" CssClass="label" Text="货品代码" meta:resourcekey="lblSkuID"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblWidth" runat="server" CssClass="label" Text="宽" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="lblWidth"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblWeight" runat="server" CssClass="label" Text="重量" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="lblWeight"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtBarcode" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtBarcode"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtSkuID" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtSkuID"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtWidth" runat="server" CssClass="textbox" meta:resourcekey="txtWidth"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtWeight" runat="server" CssClass="textbox" meta:resourcekey="txtWeight"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblQty" runat="server" CssClass="label" Text="数量" meta:resourcekey="lblQty"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblContainerNO" runat="server" CssClass="label" Text="集装箱号" meta:resourcekey="lblContainerNO"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblHeight" runat="server" CssClass="label" Text="高" meta:resourcekey="lblHeight"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblVolume" runat="server" CssClass="label" Text="体积" meta:resourcekey="lblVolume"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtQty" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtQty"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtContainerNO" runat="server" CssClass="textbox" meta:resourcekey="txtContainerNO"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtHeight" runat="server" CssClass="textbox" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="txtHeight"></asp:TextBox>
                        </td>
                        <td>
                            <asp:TextBox ID="txtVolume" runat="server" CssClass="textbox" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="txtVolume"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblSealNO" runat="server" CssClass="label" Text="铅封号" meta:resourcekey="lblSealNO"></asp:Label>
                        </td>
                        <td>
                        </td>
                        <td>
                            <asp:Label ID="lblRemark" runat="server" CssClass="label" Text="备注" meta:resourcekey="lblRemark"></asp:Label>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtSealNO" runat="server" CssClass="textbox" meta:resourcekey="txtSealNO"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                        <td>
                            <asp:TextBox ID="txtRemark" runat="server" CssClass="textbox" meta:resourcekey="txtRemark"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr style="height: 20px;">
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
                <table width="1250px" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td width="1250px" colspan="4">
                            <asp:GridView ID="gvVanningDetail" runat="server" AutoGenerateColumns="False" CssClass="gridview"
                                Width="1250px" DataKeyNames="OwnerID" OnRowDataBound="gvVanningDetail_RowDataBound"
                                AllowSorting="False" meta:resourcekey="gvVanningDetail">
                                <FooterStyle CssClass="GridViewFooterStyle" />
                                <RowStyle CssClass="GridViewRowStyle" />
                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                <Columns>
                                    <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                        <ItemStyle CssClass="GridViewRowWidth_40" />
                                    </asp:BoundField>
                                    <asp:TemplateField meta:resourcekey="TemplateField">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvVanningDetail');"
                                                meta:resourcekey="CheckBox1" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvVanningDetail');"
                                                meta:resourcekey="CheckBox2" />
                                        </FooterTemplate>
                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="SkuID" HeaderText="货品代码" FooterText="货品代码" SortExpression="SkuID"
                                        meta:resourcekey="SkuID">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                    <asp:TemplateField FooterText="数量" HeaderText="数量" SortExpression="TotQty" meta:resourcekey="TotQty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblTotQty" runat="server" Text='<%# GetPreferenceDigit(Eval("TotQty").ToString()) %>'
                                                meta:resourcekey="lblTotQty"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="可用数量" HeaderText="可用数量" SortExpression="VanningQty"
                                        meta:resourcekey="VanningQty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblVanningQty" runat="server" Text='<%# GetPreferenceDigit(Eval("VanningQty").ToString()) %>'
                                                meta:resourcekey="lblVanningQty"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="装箱数量" HeaderText="装箱数量" meta:resourcekey="Qty">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtQty" runat="server" Width="100px" onblur="VerifyTheQty(this);" ToolTip='<%# Eval("VanningQty").ToString() %>'
                                                Text='<%# GetPreferenceDigit(Eval("Qty").ToString()) %>' meta:resourcekey="txtInBoxQty"></asp:TextBox>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="已装箱数量" HeaderText="已装箱数量" SortExpression="VannedQty"
                                        meta:resourcekey="VannedQty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblVannedQty" runat="server" Text='<%# GetPreferenceDigit(Eval("VannedQty").ToString()) %>'
                                                meta:resourcekey="lblVannedQty"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="订单号" HeaderText="订单号" SortExpression="OrderID" meta:resourcekey="OrderID">
                                        <ItemTemplate>
                                            <asp:Label ID="lblOrderID" runat="server" Text='<%# Eval("OrderID").ToString() %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="订单行号" HeaderText="订单行号" SortExpression="OrderLineID"
                                        meta:resourcekey="OrderLineID">
                                        <ItemTemplate>
                                            <asp:Label ID="lblOrderLineID" runat="server" Text='<%# Eval("OrderLineID").ToString() %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_50" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="拣货单号" HeaderText="拣货单号" SortExpression="PickDetailID"
                                        meta:resourcekey="PickDetailID">
                                        <ItemTemplate>
                                            <asp:Label ID="lblPickDetailID" runat="server" Text='<%# Eval("PickDetailID") %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="批次号" HeaderText="批次号" SortExpression="Lot" meta:resourcekey="Lot">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLot" runat="server" Text='<%# Eval("Lot") %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="货位" HeaderText="货位" SortExpression="Loc" meta:resourcekey="Loc">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLoc" runat="server" Text='<%# Eval("Loc") %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="LPN" HeaderText="LPN" SortExpression="LpnID" meta:resourcekey="LpnID">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLpnID" runat="server" Text='<%# Eval("LpnID") %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr style="height: 30px;">
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
                <input id="hdnOwnerID" type="hidden" runat="server" />
                <input id="hdnFrom" runat="server" type="hidden" />
                <input id="hdnOrderID" runat="server" type="hidden" />
                <input id="hdnVanningID" runat="server" type="hidden" />
                <input id="hdnType" runat="server" type="hidden" value="0" />
            </div>
        </div>
    </div>
    </form>
</body>
</html>
